@use "../_variables" as *;
@use "sass:color";

.infotooltip-content {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  border-radius: 4px;
  padding: 16px;
  line-height: 20px;
  background-color: var(--bg-weak);
  color: var(--text-medium);
  // box-shadow: hsl(206 22% 7% / 35%) 0px 10px 38px -10px, hsl(206 22% 7% / 20%) 0px 10px 20px -15px;
  user-select: none;
  animation-duration: 400ms;
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
  z-index: 2500;
  box-shadow: 0px 3px 7px var(--shadow);
  white-space: pre-line;

  span {
    padding: 2px 6px;
    border: 1px solid #FFFFFF;
    border-radius: 4px;
    font-size: 12px;
    line-height: 14px;
  }

}
.infotooltip-content[data-state='delayed-open'][data-side='top'] {
  animation-name: slideDownAndFade;
}
.infotooltip-content[data-state='delayed-open'][data-side='right'] {
  animation-name: slideLeftAndFade;
}
.infotooltip-content[data-state='delayed-open'][data-side='bottom'] {
  animation-name: slideUpAndFade;
}
.infotooltip-content[data-state='delayed-open'][data-side='left'] {
  animation-name: slideRightAndFade;
}

.infotooltip-arrow {
  fill: var(--text);
}


@keyframes slideUpAndFade {
  from {
    opacity: 0;
    transform: translateY(2px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideRightAndFade {
  from {
    opacity: 0;
    transform: translateX(-2px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideDownAndFade {
  from {
    opacity: 0;
    transform: translateY(-2px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideLeftAndFade {
  from {
    opacity: 0;
    transform: translateX(2px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
